﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace UI.logwork
{
    public partial class submitlog : Form
    {
        public submitlog()
        {
            InitializeComponent();
        }

        private void skinButton1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "" || textBox1.Text == null)
            {
                MessageBox.Show("没有输入");
                return;
            }
            int uid=UI.Global.uid;
            String detail=textBox1.Text;
            Model.worklog workl=new Model.worklog();
            workl.Detail=detail;
            workl.Uid=uid;
            workl.Datetime=DateTime.Now.ToString();
            if (DAL.UserServer.addWorklog(workl) > 0)
            {
                MessageBox.Show("添加成功");
                this.Close();
            }
            else {
                MessageBox.Show("添加失败");
            }
        }
    }
}
